import request from '@/utils/http'

export const getDetails = (id) => {
  return request({
    url: '/goods',
    params: {
      id
    }
  })
}
/**
 * @params {Number} id - 商品id
 * @params {Number} type - 1代表24小时热榜 - 2代表周热销榜单
 * @params {Number} limit - 获取个数
 */
export const fetchHotGoodsAPI = ({id,type,limit = 3}) => {
  return request({
    url:'/goods/hot',
    params: {
      id,
      type,
      limit
    }
  })
}